def str_to_size(sizeStr: str) -> int:
    i = 0
    while i < sizeStr.__len__():
        if sizeStr[i] == "." or (sizeStr[i] >= '0' and sizeStr[i] <= '9'):
            i += 1
        else:
            break
    unit = sizeStr[i:].lower()
    number = float(sizeStr[:i])

    if unit in ["", "b", "byte"]:
        return int(number)
    elif unit in ["k", "kb", "kilobyte"]:
        return int(number * 1024)
    elif unit in ["m", "mb", "megabyte"]:
        return int(number * 1024 * 1024)
    elif unit in ["g", "gb", "gigabyte"]:
        return int(number * 1024 * 1024 * 1024)
    elif unit in ["t", "tb", "terabyte"]:
        return int(number * 1024 * 1024 * 1024 * 1024)
    elif unit in ["p", "pb", "petabyte"]:
        return int(number * 1024 * 1024 * 1024 * 1024 * 1024)
    elif unit in ["e", "eb", "exabyte"]:
        return int(number * 1024 * 1024 * 1024 * 1024 * 1024 * 1024)


if __name__ == '__main__':
    print(str_to_size("234m"))
